import myaxios from '@/utils/request.js'

// 登录
function userLogin ({ mobile, code }) {
  return myaxios({
    url: '/app/v1_0/authorizations',
    method: 'post',
    data: {
      mobile: mobile,
      code: code
    },
    needToken: false
  })
}

//  获取用户信息
function getUserInfo () {
  return myaxios({
    url: '/app/v1_0/user',
    method: 'GET',
    needToken: true
  })
}

export { userLogin, getUserInfo }
